<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div class="box">
      <p class="pa">hello p1</p>
      <p class="pa">hello p2</p>
      <p>hello p3</p>
    </div>
    <div class="max">
      <p class="pa">hello p4</p>
      <p>hello p5</p>
    </div>
    <input type="text" name="uname" id="" />
    <input type="text" name="email" id="" />
    <script>
      const x = document.getElementsByClassName("pa");
      const y = document.querySelectorAll(".pa");

      setInterval(() => {
        console.log(x);
        console.log(y);
      }, 3000);
    </script>
  </body>
</html>
